package thread;

/**
 * Created with IntelliJ IDEA.
 * Description: Java中的锁具有可重入性
 * User: 王圆豪
 * Date: 2025-04-26
 * Time: 20:25
 */
public class Demo20 {
    public static void main(String[] args) {
        Object locker = new Object();
        Thread thread = new Thread(()->{
            synchronized (locker){
                synchronized (locker){

                }
            }
            System.out.println("thread线程结束！");
        });
        thread.start();
    }
}
